import request from '@/utils/request'

// 查询仪器报废列表
export function listScrap(query) {
  return request({
    url: '/labdata/scrap/list',
    method: 'get',
    params: query
  })
}

// 查询仪器报废详细
export function getScrap(scrapId) {
  return request({
    url: '/labdata/scrap/' + scrapId,
    method: 'get'
  })
}

// 新增仪器报废
export function addScrap(data) {
  return request({
    url: '/labdata/scrap',
    method: 'post',
    data: data
  })
}

// 修改仪器报废
export function updateScrap(data) {
  return request({
    url: '/labdata/scrap',
    method: 'put',
    data: data
  })
}

// 删除仪器报废
export function delScrap(scrapId) {
  return request({
    url: '/labdata/scrap/' + scrapId,
    method: 'delete'
  })
}

// 导出仪器报废
export function exportScrap(query) {
  return request({
    url: '/labdata/scrap/export',
    method: 'get',
    params: query
  })
}